import { App } from 'vue'
import { ConfigProvider,Button, Notify, Loading, Dialog, Tabbar, TabbarItem, Swipe, SwipeItem, Image as VanImage, Lazyload, Grid, GridItem, DropdownMenu,DropdownItem,Field,Form,Slider,Rate,PullRefresh,List,CellGroup ,Empty,NavBar,Sidebar,SidebarItem,Tab, Tabs,Cell,Radio,Badge,AddressEdit,Tag,Search,Uploader} from 'vant';
import Vant from 'vant';
import 'vant/lib/index.css';

export default (app: App): void => {
	// 按需导入组件列表
	const components = [
		ConfigProvider,
		Button,
		Notify,
		Loading,
		Dialog,
		Tabbar,
		TabbarItem,
		Swipe,
		SwipeItem,
		VanImage,
		Lazyload,
		Grid,
		GridItem,
		DropdownMenu,
		DropdownItem,
		Field,
		Form,
		Slider,
		Rate,
		PullRefresh,
		List,
		CellGroup,
		Empty,
		NavBar,
		Sidebar,
		SidebarItem,
		Tab,
		Tabs,
		Cell,
		Radio,
		Badge,
		AddressEdit,
		Tag,
		Search,Uploader]

	components.forEach(component => {
		app.use(component)
	})
	app.config.globalProperties.$notify = Notify
	app.config.globalProperties.$dialog = Dialog
}



